package com.jnu.mydiary.ui.shouye1;

import com.jnu.mydiary.ui.users.User;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

public class myBean implements Serializable, Comparable<myBean> {
    private String date;
    private String title;
    private int wImageId;
    private int mImageId;
    private String text;
    private String mood;


    private ArrayList<Integer> dialy;

    public myBean(String date,String title,int wImageId,int mImageId,String text,ArrayList<Integer> dialy,String mood) {
        this.date=date;
        this.title=title;
        this.wImageId=wImageId;
        this.mImageId=mImageId;
        this.text=text;
        this.dialy=dialy;
        this.mood = mood;
    }
    public int getDay(){
        String[] a=date.split("-");
        int day=Integer.parseInt(a[2]);
        return day;
    }
    public Integer getDateInt(){
        String[] a=date.split("-");
        String b=a[0]+a[1]+a[2];
        int sum=Integer.parseInt(b);
        return sum;
    }

    public String getMood() {
        return mood;
    }

    public ArrayList<Integer> getDialy() {
        return dialy;
    }

    public String getText() {
        return text;
    }

    public String getDate() {
        return date;
    }

    public int getmImageId() {
        return mImageId;
    }

    public String getTitle() {
        return title;
    }

    public int getwImageId() {
        return wImageId;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public void setmImageId(int mImageId) {
        this.mImageId = mImageId;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setwImageId(int wImageId) {
        this.wImageId = wImageId;
    }



  

    @Override
    public int compareTo(myBean o) {
        return this.getDateInt().compareTo(o.getDateInt());
    }
}
